package com.psq.core.common.model

import android.content.Intent

abstract class IntentViewModel : BaseViewModel() {

    fun intent(block: Intent.() -> Unit) {
        val intent = Intent()
        intent.block()
        onIntent(intent)
    }

    fun intent(action: String) {
        intent {
            this.action = action
        }
    }

    abstract fun onIntent(intent: Intent)
}